import React from 'react';
import { Table } from 'antd';
import styles from './index.less';

// 通用软件表格
const sofeTable = ({ data = [], loading = false }) => {
    const columns = [
        {
            title: '软件类型',
            dataIndex: 'softType',
            key: 'softType',
            width: 246
        },
        {
            title: '软件名称',
            dataIndex: 'softName',
            key: 'softName'
        }
    ];

    return (
        <div style={{ height: 'auto', maxHeight: '385px', overflow: 'auto', paddingBottom: '5px' }}>
            <Table
                className={styles.softTable}
                loading={loading}
                rowKey="id"
                columns={columns}
                dataSource={data}
                pagination={false}
                // style={{ width: '768px' }}
            />
        </div>
    );
};

export default sofeTable;
